package cn.farm.farm.Entity.Common;

import javax.persistence.Table;

@Table(name = "user")
public class User {
    private Integer userid;

    private String password;

    private Integer role;

    private String name;

    private String nickname;

    private String phone;

    private String email;

    private Integer address;

    private String postcode;

    private String photo;

    private String introduction;

    private Integer state;

    public User(String name, String password, String nickname, String phone, String email, Integer address, String postcode, String photo, Integer state, Integer role) {
        this.password = password;
        this.role = role;
        this.name = name;
        this.nickname = nickname;
        this.phone = phone;
        this.email = email;
        this.address = address;
        this.postcode = postcode;
        this.photo = photo;
        this.introduction = introduction;
        this.state = state;
    }

    public User(Integer userid, String password, Integer role, String name, String nickname, String phone, String email, Integer address, String postcode, String photo, String introduction, Integer state) {
        this.userid = userid;
        this.password = password;
        this.role = role;
        this.name = name;
        this.nickname = nickname;
        this.phone = phone;
        this.email = email;
        this.address = address;
        this.postcode = postcode;
        this.photo = photo;
        this.introduction = introduction;
        this.state = state;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname == null ? null : nickname.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public Integer getAddress() {
        return address;
    }

    public void setAddress(Integer address) {
        this.address = address;
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode == null ? null : postcode.trim();
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo == null ? null : photo.trim();
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction == null ? null : introduction.trim();
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }
}